package com.hwadee.ems.domain.po;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.Year;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

/**
 * <p>
 * 班级
 * </p>
 *
 * @author EnosElinsa
 * @since 2024/06/21
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Class implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 班级编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 年级
     */
    private Year grade;

    /**
     * 专业编号 references major(id) for (name)
     */
    private Long majorId;

    /**
     * 班级名称，如：21软工R5
     */
    private String name;

    /**
     * 学生人数
     */
    private Integer studentCount;

    /**
     * 院系编号 references department(id) for (name)
     */
    private Long departmentId;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    /**
     * 逻辑删除标识
     */
    @TableLogic
    private Boolean isDeleted;

}
